using System;
using System.Collections.Generic;
using System.Text;
using CodePlex.Resourceful.Amazon.S3;
using System.IO;
using System.Diagnostics;
using System.Reflection;
using CodePlex.Resourceful.Amazon.S3.Test;
using System.Text.RegularExpressions;
using CodePlex.Resourceful.Amazon.S3.Actions;
using System.Net;

namespace CodePlex.Resourceful.Examples
{
    public static class S3Example
    {

      
        public static void Run()
        {

            string aws = Environment.GetEnvironmentVariable("AWS");

            string accessKeyID = aws.Split(':')[0];
            string secretAccessKey = aws.Split(':')[1];

            bool useSSL = false;

            //S3Client client = new S3Client(accessKeyID, secretAccessKey,useSSL);
           // client.Tracer.AddListener(Console.Out);

            S3Connection cn = new S3Connection(accessKeyID, secretAccessKey, useSSL, RequestStyle.VHost);
            //cn.Tracer.AddListener(Console.Out);


            Tracer testTracer = new Tracer();
            testTracer.AddListener(Console.Out);

            S3ConnectionTests.Run(testTracer, cn, Datacenter.US);
            S3ConnectionTests.Run(testTracer, cn, Datacenter.EU);
            
        }


    }
}
